 <!--购物车 -->
<template>
  <div class="shop-car">
    <!-- 导航 -->
    <nav-bar class="nav-bar">
      <div slot="center">购物车({{length}})</div>
    </nav-bar>
    <!-- 商品列表 -->
    <cart-list />
    <!-- 底部汇总 -->
    <cart-bottom-bar />

  </div>
</template>
<script>
// import Scroll from 'components/common/scroll/Scroll'

import NavBar from 'components/common/navbar/NavBar'

import CartList from './childComps/CartList'
import CartBottomBar from './childComps/CartBottomBar'

import { mapGetters } from 'vuex'

export default {
  name: 'Shopcar',
  data() {
    return {
      // scroll: null      
    }
  },
  components: {
    NavBar,
    CartList,
    CartBottomBar
  },
  computed: {
    // cartLength() {
    //   return this.$store.getters.cartLength
    // }
    ...mapGetters({
      length:'cartLength'
    })
  },
  mounted(){

  }
  
}
</script>
<style scoped>
/* .shop-car{
  position: relative;
  height: 100vh;
}
.content{
  background: red;
  position: absolute;
  left: 0;
  top: 44px;
  right: 0;
  bottom: 49px;
} */
.nav-bar {
  background-color: var(--color-tint);
  color: #fff;
  font-weight: 700;
}
</style>
